/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package cn.itcast;

import java.io.FileWriter;
import java.io.PrintWriter;

/**
 * <p>Project: JavaStudy - Test0224
 * <p>Powered by jiangbo On 2023-02-25
 * 10:32:26
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class Test0224 {
    public static void main(String[] args) {
        String str = "Hello " + String.format("%tF %<tT %<tA%n",System.currentTimeMillis());
//输出到控制台显示
        System.out.println(str);
//输出到文件中
        PrintWriter out = null;
        try {
            out = new PrintWriter(new FileWriter("jse.txt",true));
            System.out.println("输出成功");
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        out.println(str);
        out.flush();
    }
}


